<template>
	<view>
		<view class="userCard">
			<safeTopVue />
			<view class="userProfile">
				<view class="rowEnd " style="padding: 0 40rpx;"
					@click="goToPage('/pages/tabbar/mine/page/setting/setting')">
					设置
				</view>
				<view style="gap: 30rpx;display: flex;align-items: center;height: 200rpx;padding: 0rpx 50rpx;">
					<image class="image" src="/static/logo.png"></image>
					<text class="titleH1" style="color: var(--themeFontColor7);letter-spacing: 1rpx">13888888888</text>
				</view>
			</view>
		</view>
		<view class="cloumCenter">
			<view class="cardContiner mtb20" v-for="(setting,index) in userSetting" :key="index">
				<ListTitle class="borderbottom" v-for="(item,index) in setting" :key="index" :title="item.title"
					:leftIcon="item.icon" rightIcon="arrow-right" @click="goToPage(item.url)" />
			</view>
		</view>

	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import ListTitle from '@/components/ListTitle/ListTitle.vue';

	const userSetting = ref([
		[{
			title: '人员管理',
			icon: 'file-text',
			url: '/pages/tabbar/mine/page/personnel/personnel',
			auth: ['agent', 'platform']
		}, {
			title: '银行卡管理',
			icon: 'coupon',
			url: '/pages/tabbar/mine/page/bankList/bankList',
			auth: ['agent', 'platform']
		}, {
			title: '佣金结算审核',
			icon: 'red-packet',
			url: '/pages/tabbar/mine/page/moneyAudit/moneyAudit',
			auth: ['agent', 'platform']
		}, {
			title: '代理商学院',
			icon: 'play-circle',
			url: '/pages/tabbar/mine/page/course/course',
			auth: ['agent', 'platform']
		}],
		[{
			title: '联系客服',
			icon: 'server-man',
			url: '/pages/tabbar/mine/page/customerService/customerService',
			auth: ['agent', 'platform']
		}]
	])
	const goToPage = (url) => {
		uni.navigateTo({
			url: url
		})
	}
</script>

<style lang="scss" scoped>
	.userCard {
		width: 100%;
		background: var(--homePageBackground);
		position: relative;

		.userProfile {
			color: #fff;

			.image {
				width: 120rpx;
				height: 120rpx;
				border-radius: 50%;
			}

		}
	}
</style>